package com.atguigu.eduservice.entity.dto;

import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 添加课程的实体类
 */
@Data
public class CourseAddDto {

    @ApiModelProperty(value = "课程ID")
    private String id;

    @ApiModelProperty(value = "课程讲师ID")
    private String teacherId;

    @ApiModelProperty(value = "课程专业ID")
    private String subjectId;

    @ApiModelProperty(value = "课程专业ID")
    private List<String> subjectIds;

    @ApiModelProperty(value = "课程专业父级ID")
    private String subjectParentId;

    @ApiModelProperty(value = "课程标题")
    private String title;

    @ApiModelProperty(value = "课程销售价格，设置为0则可免费观看")
    private BigDecimal price;

    @ApiModelProperty(value = "总课时")
    private Integer lessonNum;

    @ApiModelProperty(value = "课程封面图片路径")
    private String cover;

    @ApiModelProperty(value = "课程状态 Draft未发布  Normal已发布")
    private String status;

    private boolean toll = true;

    // 描述

    @ApiModelProperty(value = "课程简介")
    private String description;

    public List<String> getSubjectIds() {
        List<String> list = Lists.newLinkedList();
        list.add(subjectParentId);
        list.add(subjectId);
        return list;
    }
}
